\hypertarget{classCAESCipherStream}{
\section{\-C\-A\-E\-S\-Cipher\-Stream \-Class \-Reference}
\label{classCAESCipherStream}\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}}
}


{\ttfamily \#include $<$aes\-\_\-cipher\-\_\-stream.\-h$>$}

\-Inheritance diagram for \-C\-A\-E\-S\-Cipher\-Stream\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classCAESCipherStream}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCAESCipherStream_a08a7a043543f55dc40b91557a322ae0e}{\-C\-A\-E\-S\-Cipher\-Stream} (std\-::string $\ast$p\-Password)
\item 
virtual \hyperlink{classCAESCipherStream_a5464e97aa47cc689601f249d1ccf04c4}{$\sim$\-C\-A\-E\-S\-Cipher\-Stream} ()
\item 
virtual void \hyperlink{classCAESCipherStream_a57928fa0882245c95f17941d681d5b06}{get\-Next} (std\-::string $\ast$p\-Stream, unsigned int p\-Count)
\item 
virtual bool \hyperlink{classCAESCipherStream_a45191721c1acb7198d4abf9441a56878}{get\-Static\-Key} (std\-::string $\ast$, unsigned int p\-Count, unsigned int p\-Offset)
\item 
virtual void \hyperlink{classCAESCipherStream_a9a10464c2dbf9d8e1357783897c5fde9}{reset} (std\-::string $\ast$p\-Password)
\end{DoxyCompactItemize}
\subsection*{\-Static \-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
static std\-::string \hyperlink{classCAESCipherStream_a3fd0e021bc1f22aa93f80ad8f6de14c0}{hex\-Encode} (byte $\ast$p\-Data, int p\-Size)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
\-O\-F\-B\-\_\-\-Mode$<$ \-A\-E\-S $>$\-::\-Encryption $\ast$ \hyperlink{classCAESCipherStream_a139295e21b6291df5c87491f24455688}{m\-A\-E\-S}
\item 
std\-::string \hyperlink{classCAESCipherStream_ac17b14ae7ff82b6771867d5b4818c201}{m\-Static\-Cipher\-Stream}
\end{DoxyCompactItemize}


\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classCAESCipherStream_a08a7a043543f55dc40b91557a322ae0e}{
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!CAESCipherStream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\subsubsection[{\-C\-A\-E\-S\-Cipher\-Stream}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-A\-E\-S\-Cipher\-Stream\-::\-C\-A\-E\-S\-Cipher\-Stream (
\begin{DoxyParamCaption}
\item[{std\-::string $\ast$}]{p\-Password}
\end{DoxyParamCaption}
)}}
\label{classCAESCipherStream_a08a7a043543f55dc40b91557a322ae0e}
\-Constructor of \hyperlink{classCAESCipherStream}{\-C\-A\-E\-S\-Cipher\-Stream} class. \-Takes the password as a parameter and initializes the \-A\-E\-S cipher stream. \-The \-A\-E\-S cipher stream is initialized in \-O\-F\-B mode.


\begin{DoxyParams}{\-Parameters}
{\em p\-Password} & \-The password that serves as the key and the initialization vector of the \-A\-E\-S cipher stream (in other words\-: the same password gives the same cipher stream). \\
\hline
\end{DoxyParams}
\hypertarget{classCAESCipherStream_a5464e97aa47cc689601f249d1ccf04c4}{
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!$\sim$\-C\-A\-E\-S\-Cipher\-Stream@{$\sim$\-C\-A\-E\-S\-Cipher\-Stream}}
\index{$\sim$\-C\-A\-E\-S\-Cipher\-Stream@{$\sim$\-C\-A\-E\-S\-Cipher\-Stream}!CAESCipherStream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\subsubsection[{$\sim$\-C\-A\-E\-S\-Cipher\-Stream}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-A\-E\-S\-Cipher\-Stream\-::$\sim$\-C\-A\-E\-S\-Cipher\-Stream (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCAESCipherStream_a5464e97aa47cc689601f249d1ccf04c4}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classCAESCipherStream_a57928fa0882245c95f17941d681d5b06}{
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!get\-Next@{get\-Next}}
\index{get\-Next@{get\-Next}!CAESCipherStream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\subsubsection[{get\-Next}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-A\-E\-S\-Cipher\-Stream\-::get\-Next (
\begin{DoxyParamCaption}
\item[{std\-::string $\ast$}]{p\-Stream, }
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCAESCipherStream_a57928fa0882245c95f17941d681d5b06}
\-Gets the next p\-Count bytes of the \-A\-E\-S cipher stream and writes them onto the p\-Stream string. \-It automatically takes a char array with a length of p\-Count and fills it with zero bytes. \-This char array is taken as the plain text so that we get a pure cipher stream which only depends on the password (which is also taken as the \-I\-V).


\begin{DoxyParams}{\-Parameters}
{\em p\-Stream} & \-The std\-::string where the cipher stream bytes are written on (don't forget to specify the correct length with p\-Count) \\
\hline
{\em p\-Count} & \-The length of the p\-Stream string and therefore the amount of bytes of the cipher stream that should be returned \\
\hline
\end{DoxyParams}


\-Implements \hyperlink{classCCipherStream_afec8a27d2cae44059773f4acd4435c21}{\-C\-Cipher\-Stream}.

\hypertarget{classCAESCipherStream_a45191721c1acb7198d4abf9441a56878}{
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!get\-Static\-Key@{get\-Static\-Key}}
\index{get\-Static\-Key@{get\-Static\-Key}!CAESCipherStream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\subsubsection[{get\-Static\-Key}]{\setlength{\rightskip}{0pt plus 5cm}bool \-C\-A\-E\-S\-Cipher\-Stream\-::get\-Static\-Key (
\begin{DoxyParamCaption}
\item[{std\-::string $\ast$}]{p\-Stream, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Offset}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCAESCipherStream_a45191721c1acb7198d4abf9441a56878}
\-Returns a fixed part of the cipher stream without taking into account the current position in the stream. \-With this method, any part of the stream can be read as often as desired.


\begin{DoxyParams}{\-Parameters}
{\em p\-Stream} & \-The std\-::string where the cipher stream bytes are written on \\
\hline
{\em p\-Count} & \-The length of the p\-Stream string and therefore the amount of bytes of the cipher stream that should be returned \\
\hline
{\em p\-Offset} & \-The offset inside the \-A\-E\-S cipher stream \\
\hline
\end{DoxyParams}


\-Implements \hyperlink{classCCipherStream_a1013262cd5a93200e83e4c3a1c74247b}{\-C\-Cipher\-Stream}.

\hypertarget{classCAESCipherStream_a3fd0e021bc1f22aa93f80ad8f6de14c0}{
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!hex\-Encode@{hex\-Encode}}
\index{hex\-Encode@{hex\-Encode}!CAESCipherStream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\subsubsection[{hex\-Encode}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string \-C\-A\-E\-S\-Cipher\-Stream\-::hex\-Encode (
\begin{DoxyParamCaption}
\item[{byte $\ast$}]{p\-Data, }
\item[{int}]{p\-Size}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classCAESCipherStream_a3fd0e021bc1f22aa93f80ad8f6de14c0}
\-Encodes a given byte stream in hex. \-This method may be used for debugging purposes, such as logging or displaying the password hash in the command line.


\begin{DoxyParams}{\-Parameters}
{\em p\-Data} & \-The data to be hex-\/encoded \\
\hline
{\em p\-Size} & \-The size of the data array \\
\hline
\end{DoxyParams}
\hypertarget{classCAESCipherStream_a9a10464c2dbf9d8e1357783897c5fde9}{
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!reset@{reset}}
\index{reset@{reset}!CAESCipherStream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\subsubsection[{reset}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-A\-E\-S\-Cipher\-Stream\-::reset (
\begin{DoxyParamCaption}
\item[{std\-::string $\ast$}]{p\-Password}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCAESCipherStream_a9a10464c2dbf9d8e1357783897c5fde9}
\-Resets the \-A\-E\-S cipher stream with the given password. \-It basically does the same as creating a new object of this class. \-The password is taken as the key and the initialization vector of the \-A\-E\-S cipher stream (which is initialized in \-O\-F\-B mode).


\begin{DoxyParams}{\-Parameters}
{\em p\-Password} & \-The password that serves as the key and the initialization vector of the \-A\-E\-S cipher stream (in other words\-: the same password gives the same cipher stream). \\
\hline
\end{DoxyParams}


\-Implements \hyperlink{classCCipherStream_a17a5f9b872a266ca79308d31118ab6ff}{\-C\-Cipher\-Stream}.



\subsection{\-Member \-Data \-Documentation}
\hypertarget{classCAESCipherStream_a139295e21b6291df5c87491f24455688}{
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!m\-A\-E\-S@{m\-A\-E\-S}}
\index{m\-A\-E\-S@{m\-A\-E\-S}!CAESCipherStream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\subsubsection[{m\-A\-E\-S}]{\setlength{\rightskip}{0pt plus 5cm}\-O\-F\-B\-\_\-\-Mode$<$\-A\-E\-S$>$\-::\-Encryption$\ast$ {\bf \-C\-A\-E\-S\-Cipher\-Stream\-::m\-A\-E\-S}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCAESCipherStream_a139295e21b6291df5c87491f24455688}
\hypertarget{classCAESCipherStream_ac17b14ae7ff82b6771867d5b4818c201}{
\index{\-C\-A\-E\-S\-Cipher\-Stream@{\-C\-A\-E\-S\-Cipher\-Stream}!m\-Static\-Cipher\-Stream@{m\-Static\-Cipher\-Stream}}
\index{m\-Static\-Cipher\-Stream@{m\-Static\-Cipher\-Stream}!CAESCipherStream@{\-C\-A\-E\-S\-Cipher\-Stream}}
\subsubsection[{m\-Static\-Cipher\-Stream}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string {\bf \-C\-A\-E\-S\-Cipher\-Stream\-::m\-Static\-Cipher\-Stream}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCAESCipherStream_ac17b14ae7ff82b6771867d5b4818c201}


\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{aes__cipher__stream_8h}{aes\-\_\-cipher\-\_\-stream.\-h}\item 
\hyperlink{aes__cipher__stream_8cxx}{aes\-\_\-cipher\-\_\-stream.\-cxx}\end{DoxyCompactItemize}
